package com.zhanbo.zhanbowymusic.main.featured.adapter;

import android.content.Context;
import android.text.TextUtils;

import com.mwx.baselib.base.BaseBindingAdapter;
import com.mwx.baselib.bean.MVListBean;
import com.mwx.baselib.utils.GlideUtils;
import com.zhanbo.zhanbowymusic.R;
import com.zhanbo.zhanbowymusic.databinding.ItemSingerMvBinding;

public class SingerMVListAdapter extends BaseBindingAdapter<MVListBean.ItemsDTO, ItemSingerMvBinding> {
    public SingerMVListAdapter(Context context) {
        super(context);
    }

    @Override
    protected int getLayoutResId(int viewType) {
        return R.layout.item_singer_mv;
    }

    @Override
    protected void onBindItem(ItemSingerMvBinding binding, MVListBean.ItemsDTO item) {
        GlideUtils.loadImageRounded10(context,item.getCoverUrl(),binding.imgMv);
        binding.tvTitle.setText(TextUtils.isEmpty(item.getName())?"":item.getName());
    }
}
